import Header from "./Header";
import { Tabs } from "antd-mobile";
import { getTicketList } from "../request/index";
import { useEffect, useState } from "react";
import "./List.css";
function List() {
  // useEffect(() => {
  //   getTicketList().then((res) => {
  //     console.log(res);
  //   });
  // }, []);
  // const [EndData,setEndData] = useState<any[]>([])
  const EndData = [
    {
      A: "07:89",
      B: "上海站",
      C: "二等座",
      D: "2时79分",
      E: "G7867",
      F: "一等座",
      G: "06:65",
      H: "南京南站",
      I: "￥243",
    },
    {
      A: "47:4",
      B: "北京站",
      C: "一等座",
      D: "6时9分",
      E: "G67",
      F: "一等座",
      G: "16:05",
      H: "江苏站",
      I: "￥344",
    },
    {
      A: "00:09",
      B: "山东站",
      C: "三等座",
      D: "2时79分",
      E: "G77",
      F: "一等座",
      G: "06:65",
      H: "合肥站",
      I: "￥743",
    },
    {
      A: "12:19",
      B: "重庆站",
      C: "一等座",
      D: "7时7分",
      E: "G54",
      F: "一等座",
      G: "06:25",
      H: "南京南站",
      I: "￥543",
    },
  ];
  return (
    <div className="zss">
      <Header title="上海—南京南"></Header>
      <Tabs>
        <Tabs.Tab title="今天" key="fruits"></Tabs.Tab>
        <Tabs.Tab title="明天" key="vegetables">
          <Tabs>
            <Tabs.Tab title="火车" key="fruits">
              {/* --------------------------- */}
              {EndData.map((item) => {
                return (
                  <>
                    <div className="cc">
                      <div className="cc1">
                        <div className="cc11">
                          <h3>{item.A}</h3>
                        </div>
                        <div className="cc12">{item.B}</div>
                        <div className="cc13">{item.C}</div>
                      </div>
                      <div className="cc2">
                        <div className="cc21">{item.D}</div>
                        <div className="cc22">{item.E}</div>
                        <div className="cc23">{item.F}</div>
                      </div>
                      <div className="cc3">
                        <div className="cc31">
                          <h3>{item.G}</h3>
                        </div>
                        <div className="cc31">{item.H}</div>
                      </div>
                      <div className="cc4">{item.I}</div>
                    </div>
                  </>
                );
              })}

              {/* --------------------------- */}
            </Tabs.Tab>
            <Tabs.Tab title="顺风车" key="vegetables">
              西红柿
            </Tabs.Tab>
            <Tabs.Tab title="中转" key="animals">
              蚂蚁
            </Tabs.Tab>
          </Tabs>
        </Tabs.Tab>
        <Tabs.Tab title="后天" key="animals">
          BBB
        </Tabs.Tab>
        <Tabs.Tab title="周一" key="fruits1">
          CCC
        </Tabs.Tab>
        <Tabs.Tab title="周二" key="vegetables1">
          DDD
        </Tabs.Tab>
        <Tabs.Tab title="周三" key="animals1">
          EEE
        </Tabs.Tab>
      </Tabs>
    </div>
  );
}

export default List;
